package util;

import java.util.Random;

/**
 * Identifiers
 */
public class Identifiers {
    static Random random = new Random();

    public static String generate16bitId() {
       int r =  random.nextInt(Short.MAX_VALUE);
       if( r>0 )
           return "x"+Integer.toString(r, 36);
       else
           return "y"+Integer.toString(-r, 36);
   }
    
    public static String generate32bitId() {
         int r = random.nextInt();
        if( r>0 )
            return "x"+Integer.toString(r, 36);
        else
            return "y"+Integer.toString(-r, 36);
    }

    public static String generate64bitId() {
        long r = random.nextLong();
        if( r>0 )
            return "x"+Long.toString(r, 36);
        else
            return "y"+Long.toString(-r, 36);
    }
}
